type GreetFunction = (a:string) => void

function greeter(fn:GreetFunction){
  fn('Hello world')
}

function printToConsole(s:string){
  console.log(s);
} 
greeter(printToConsole)